//
//  BluBusiness.h
//  KangarooDoctor
//
//  Created by 廖罡 on 2024/2/1.
//

#import <Foundation/Foundation.h>
#import "PackParse.h"
#import <CoreBluetooth/CoreBluetooth.h>

NS_ASSUME_NONNULL_BEGIN

@protocol BLUBusinesP
- ( void ) getDeviceList:(NSArray *) list;
- ( void ) startMessare;
-(void)bluDidDisconnect;

-(void)bluDidReceiveMsg:(NSString*)msg;

-(void)bluDidReceiveRealTimeReport:(uint8_t)highPress
                          lowPress:(uint8_t)lowPress
                         heartBeat:(uint8_t)heartBeat;

-(void)bluDidReceiveCalcResult:(uint8_t)highPress
                      lowPress:(uint8_t)lowPress
                     heartBeat:(uint8_t)heartBeat;

-(void)bluDidReceiveCalcFailResult:(NSString*)errMsg;
- (void)connectPeripheral:(CBPeripheral *)peripheral;

@end

@interface BluBusiness : NSObject

+(instancetype)shared;

- (CBPeripheralState)getBluStatus;
- ( NSString * ) getBluDeviceId;

-(void)startWithPageName: (NSString *) name uuid:(NSString *) uuid;
- (void)connectPeripheral:(CBPeripheral *)peripheral;

-(void)stop;

@property (nonatomic, weak) id<BLUBusinesP> delegate;

@end


NS_ASSUME_NONNULL_END
